﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Mvc;
using VladanStrigoNET.Samples.Blogged.Routes;

namespace VladanStrigoNET.Samples.Blogged
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            _SetupRoutes();
            _SetupDI();
        }

        private void _SetupRoutes()
        {
            RouteContainer.Initialize(RouteTable.Routes);
        }
        private void _SetupDI()
        {
            IoC.Initialize("DI.config");
            ControllerBuilder.Current.SetDefaultControllerFactory(typeof(WindsorControllerFactory));
        }
    }
}